<template>
    <div style="background-color: #ffffff;">
        <!-- <HeadNav :title="currentDate+'待入库'"></HeadNav> -->
        <!-- 周月年 -->
        <div class="content" :style="bottomHeight">
            <div class="topBox">
                <div class="sort-menu">
                    <div :class="[current === index ? 'sort_option_selected ' : '', 'sort_option']"
                        v-for="(item, index) in tabList" :key="index" :id="index"
                        @click="changeSort(index, $event, item.typeName)">
                        <div class="couponSpanText">{{ item.typeName }}</div>
                    </div>
                </div>
            </div>
            <template v-if="current ===0">
                <div class="recordList" :class="{ 'recordList_pb': recordList.length > 0 }">
                    <template v-if="recordList.length > 0 && !loading">
                        <van-checkbox-group ref="checkboxGroup" v-model="checked" :checked="checked"
                            @change="onCheckboxChange">
                            <div class="recordItem" v-for="(item, index) in recordList" :key="index" :id="item.id">
                                <div class="recordItem_bg">
                                    <div class="recordItem_top">
                                        <van-checkbox checked-color="#047DCB" :label-disabled="false"
                                            :name="item.reportId" ref="checkboxes" shape="round"
                                            :checked="item.isChecked">
                                        </van-checkbox>
                                        <div class="recordItem_top_box" @click="tocheckedDetail(item, index)">
                                            <div class="recordItemL">
                                                <div class="recordItemL-left"><img
                                                        :src="require('../../assets/images/recordIcon.png')" alt="">
                                                </div>
                                                <div class="recordItemL-right">
                                                    <div class="recordItemL-right-text">{{ item.stallName }}</div>
                                                    <div class="recordItemL-right-text" style="margin-top: 8px;">{{
                                                        item.reportTime }}
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="recordItemR">
                                                <div class="recordItemR-left">
                                                    <div class="recordItemR-left-num">共{{
                                                        item.reportChildList ? item.reportChildList.length : 0 }}项产品
                                                    </div>
                                                    <div class="recordItemR-left-price" style="margin-top: 8px;">合￥{{
                                                        item.amount
                                                        }}
                                                    </div>
                                                </div>
                                                <div class="recordItemR-right"
                                                    @click.stop="tocheckedDetail(item, index)">
                                                    <van-icon :name="item.isTag ? 'arrow-up' : 'arrow-down'"
                                                        size="11" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="details_box" v-if="item.isTag">
                                        <div class="goods-box" v-for="(ele, val) in item.reportChildList" :key="val"
                                            :id="val">
                                            <div class="goods-title">{{ ele.materialName }}({{
                                                ele.specification ? (' ' + ele.specification + '/ '):'()' }}{{ ele.unit
                                                ? (' ' + ele.unit + '/ ') : "" }} {{ ' ￥' + ele.price }})
                                            </div>
                                            <!-- <div class="goods-title" v-if="ele.materialName && ele.unit">{{
                                                ele.materialName
                                                }}{{ ele.specification ? '/' + ele.specification : '' }}{{
                                                ele.unit ? '(' + ele.unit + ')' : "" }}</div>
                                            <div class="goods-title" v-else-if="ele.materialName || ele.unit">{{
                                                ele.materialName }}(<span v-show="ele.specification">{{
                                                    `${ele.specification}` }}</span><span v-show="ele.unit">{{
                                                    `/${ele.unit}` }}</span>)</div>
                                            <div class="goods-title" v-else-if="!ele.materialName && !ele.unit">{{
                                                ele.materialName }}</div> -->
                                            <div class="goods-num">
                                                <van-button icon="minus" type="info" class="minus"
                                                    @click.stop="jian(ele)"></van-button>
                                                <div class="selectnum" @click="showInputNum(ele)">{{ ele.num }}</div>
                                                <van-button icon="plus" type="primary" class="plus"
                                                    @click.stop="add(ele)"></van-button>
                                            </div>
                                        </div>
                                        <div class="btnArea">
                                            <van-button class="btnStockIn" plain type="primary"
                                                @click="ruku(item)">入库当前档口</van-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </van-checkbox-group>
                    </template>
                    <template v-if="recordList.length === 0 && !loading">
                        <div class="empty_content">当前暂无数据</div>
                    </template>
                </div>
            </template>
            <template v-if="current === 1">
                <template v-if="recordList.length > 0 && !loading">
                    <div class="recordList">
                        <div class="recordItem_stockIn" v-for="(item, index) in recordList" :key="index"
                            @click="tocheckedDetail(item, index)">
                            <div class="recordItem_bg_stockIn">
                                <div class="stockIn_recordItemL">
                                    <div class="stockIn_recordItemL-left"><img
                                            :src="require('../../assets/images/recordIcon.png')" alt=""></div>
                                    <div class="stockIn_recordItemL-right">
                                        <div class="stockIn_recordItemL-right-text">{{ item.stallName }}</div>
                                        <div class="stockIn_recordItemL-right-text" style="margin-top: 8px;">{{
                                            item.inTime }}
                                        </div>
                                    </div>
                                </div>
                                <div class="stockIn_recordItemR">
                                    <div class="stockIn_recordItemR-left">
                                        <div class="stockIn_recordItemR-left-num">共{{
                                            item.reportChildList ? item.reportChildList.length : 0 }}项产品</div>
                                        <div class="stockIn_recordItemR-left-price" style="margin-top: 8px;">合￥{{
                                            item.inAmount
                                            }}
                                        </div>
                                    </div>
                                    <div class="stockIn_recordItemR-right" @click.stop="tocheckedDetail(item, index)">
                                        <van-icon :name="item.isTag ? 'arrow-up' : 'arrow-down'" size="11" />
                                    </div>
                                </div>
                            </div>
                            <div class="stockIn_details_box" v-if="item.isTag">
                                <div class="goods-box" v-for="(ele, val) in item.reportChildList" :key="val" :id="val">
                                    <!-- <div class="goods-title">
                                        {{ ele.materialName }}{{
                                        ele.specification ? '/' + ele.specification : '' }}{{ ele.unit ? '(' + ele.unit
                                        + ')'
                                        : "" }}
                                    </div> -->
                                    <div class="goods-title">{{ ele.materialName }}({{
                                        ele.specification ? (' ' + ele.specification + '/ '):'()' }}{{ ele.unit ? (' '
                                        + ele.unit + '/ ') : "" }} {{ ' ￥' + ele.price }})
                                    </div>
                                    <div class="stockIn_goods-num">
                                        <div class="selectnum">{{ ele.inNum }}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="recordBottom">
                        <div class="recordBottom_item date">
                            <div class="recordBottom_item_label">入库时间</div>
                            <div class="recordBottom_item_text">{{ recordList[0] ? recordList[0].inTime : '' }} </div>
                        </div>
                        <div class="recordBottom_item mt10">
                            <div class="recordBottom_item_label">入库人</div>
                            <div class="recordBottom_item_name" v-if="recordList.length > 0">
                                <img class="mr12" v-for="(item, index) in recordList[0].inSignaturePhotos" :src="item"
                                    :key="index" alt="">
                            </div>
                        </div>
                    </div>
                </template>
                <template v-if="recordList.length === 0 && !loading">
                    <div class="empty_content" style="margin-top: 48px;">当前暂无数据</div>
                </template>
            </template>

            <div class="bottomArea " id="bottomArea" ref="bottomMenu" v-if="recordList.length>0 && current===0">
                <van-checkbox checked-color="#047DCB" v-model="checkAll" :label-disabled="false" shape="round"
                    @click="handleCheckAll">
                    全选
                </van-checkbox>
                <!-- <div class="btnArea"> -->
                <van-button type="primary" class="loginBtn" @click="batchInStore">批量一键入库({{ checked.length }})
                </van-button>
                <!-- </div> -->
            </div>
        </div>
        <foot ref="footer"></foot>
        <van-popup v-model="showTips" :closeable="true" round style="width: 80%;padding-bottom: 24px;">
            <div class="top_title">你确认入库当前{{ checked.length }}个档口信息吗？</div>
            <div class="sub_btn" @click="submitStockIn">
                确定
            </div>
        </van-popup>
        <van-popup v-model="showTipsSingle" :closeable="true" round style="width: 80%;padding-bottom: 24px;">
            <div class="top_title">你确认入库当前档口信息吗？</div>
            <div class="sub_btn" @click="submitStockInSingle">
                确定
            </div>
        </van-popup>
    </div>
</template>

<script>
/* eslint-disable */
import { getParams } from '@/common/public'
import HeadNav from '@/components/HeadNav'
import foot from '../foot/foot.vue'
import {managerPageManagerInDate,inStoreApi} from '@/api/manager'
import { Loading, Toast } from 'vant';
export default {
    name: 'StockIn',
    components: {
        HeadNav,
        foot
    },
    computed: {
    },
    watch: {
        // active(newVal) {
        //     console.log('newVal', newVal)
        //     if (newVal === 0) {

        //     } else if (newVal === 0) {    

        //     } else {

        //     }
        // },
        // recordList: {
        //     handler(val) {
        //         console.log(val)
        //         var i = 0
        //         this.recordList.forEach(item => {
        //             if (item.isChecked === true) {
        //                 i++
        //             }
        //             if (i === this.recordList.length) {
        //                 this.checkAll = true
        //             } else {
        //                 this.checkAll = false
        //             }
        //         })
        //     },
        //     deep: true
        // },
        // 监听 checked 数组变化，更新全选状态
        checked: {
            handler(newChecked) {
                console.log(newChecked, 'newName')
                this.checkAll = newChecked.length === this.recordList.length
                this.selectedRowKeys = newChecked
                this.selectedRows = this.recordList.filter(item=>newChecked.includes(item.id))
            },
            deep:true
        },
        selectedRowKeys: {
            handler(val) {
                console.log(val, 'selectedRowKeys')
            }
        },
        selectedRows: {
            handler(val) {
                console.log(val, 'selectedRows')
            }
        }
    },
    data() {
        return {
            active: 1,
            loading:true,
            current: 0,
            tabList: [
                {
                    typeId: 0,
                    typeName: '未入库'
                },
                {
                    typeId: 1,
                    typeName: '已入库'
                }
            ],
            checkAll: false, // 标记是否全选
            checked: [], // 全选
            selectedRowKeys: [], // 已选择的数据的id
            selectedRows: [], // 已选择的数据
            recordList: [
            // {
            //     stallName: "1组",
            //     outTime: null,
            //     reportTime: "2025-01-28 00:13:00",
            //     inTime: null,
            //     amount: 4489.000,
            //     inAmount: null,
            //     reportChildList: [
            //         {
            //             "id": 8,
            //             "materialId": 1,
            //             "supplierId": 1,
            //             "materialName": "新东大鸡排",
            //             "specification": "件（4袋32片）",
            //             "price": 170.00,
            //             "unit": "20公斤",
            //             "num": 10.0,
            //             "inNum": 0.0,
            //             "amount": 1700.000,
            //             "inAmount": 0.000
            //         },
            //         {
            //             id: 9,
            //             materialId: 2,
            //             supplierId: 1,
            //             materialName: "润海大胸",
            //             specification: "件",
            //             price: 107.00,
            //             unit: "10公斤",
            //             num: 8.0,
            //             inNum: 0.0,
            //             amount: 856.000,
            //             inAmount: 0.000
            //         },
            //         {
            //             "id": 10,
            //             "materialId": 3,
            //             "supplierId": 1,
            //             "materialName": "鱼丸虾丸",
            //             "specification": "件（4袋）",
            //             "price": 115.00,
            //             "unit": "10公斤",
            //             "num": 7.0,
            //             "inNum": 0.0,
            //             "amount": 805.000,
            //             "inAmount": 0.000
            //         },
            //         {
            //             "id": 11,
            //             "materialId": 4,
            //             "supplierId": 1,
            //             "materialName": "手抓饼",
            //             "specification": "件（4袋）",
            //             "price": 98.00,
            //             "unit": "12公斤",
            //             "num": 6.0,
            //             "inNum": 0.0,
            //             "amount": 588.000,
            //             "inAmount": 0.000
            //         },
            //         {
            //             "id": 12,
            //             "materialId": 5,
            //             "supplierId": 1,
            //             "materialName": "培根",
            //             "specification": "件（8袋）",
            //             "price": 180.00,
            //             "unit": "12公斤",
            //             "num": 3.0,
            //             "inNum": 0.0,
            //             "amount": 540.000,
            //             "inAmount": 0.000
            //         }
            //     ],
            //     inSignaturePhotos: [],
            //     outSignaturePhoto: null,
            //     reportId: 3,
            //     stallId: 1
            // },
            // {
            //     stallName: "2组",
            //     outTime: null,
            //     reportTime: "2025-01-28 00:13:00",
            //     inTime: null,
            //     amount: 4489.000,
            //     inAmount: null,
            //     reportChildList: [
            //         {
            //             "id": 8,
            //             "materialId": 1,
            //             "supplierId": 1,
            //             "materialName": "新东大鸡排",
            //             "specification": "件（4袋32片）",
            //             "price": 170.00,
            //             "unit": "20公斤",
            //             "num": 10.0,
            //             "inNum": 0.0,
            //             "amount": 1700.000,
            //             "inAmount": 0.000
            //         },
            //         {
            //             "id": 9,
            //             "materialId": 2,
            //             "supplierId": 1,
            //             "materialName": "润海大胸",
            //             "specification": "件",
            //             "price": 107.00,
            //             "unit": "10公斤",
            //             "num": 8.0,
            //             "inNum": 0.0,
            //             "amount": 856.000,
            //             "inAmount": 0.000
            //         },
            //         {
            //             "id": 10,
            //             "materialId": 3,
            //             "supplierId": 1,
            //             "materialName": "鱼丸虾丸",
            //             "specification": "件（4袋）",
            //             "price": 115.00,
            //             "unit": "10公斤",
            //             "num": 7.0,
            //             "inNum": 0.0,
            //             "amount": 805.000,
            //             "inAmount": 0.000
            //         },
            //         {
            //             "id": 11,
            //             "materialId": 4,
            //             "supplierId": 1,
            //             "materialName": "手抓饼",
            //             "specification": "件（4袋）",
            //             "price": 98.00,
            //             "unit": "12公斤",
            //             "num": 6.0,
            //             "inNum": 0.0,
            //             "amount": 588.000,
            //             "inAmount": 0.000
            //         },
            //         {
            //             "id": 12,
            //             "materialId": 5,
            //             "supplierId": 1,
            //             "materialName": "培根",
            //             "specification": "件（8袋）",
            //             "price": 180.00,
            //             "unit": "12公斤",
            //             "num": 3.0,
            //             "inNum": 0.0,
            //             "amount": 540.000,
            //             "inAmount": 0.000
            //         }
            //     ],
            //     inSignaturePhotos: [],
            //     outSignaturePhoto: null,
            //     reportId: 4,
            //     stallId: 1
            // }
            ],
            show: true,
      
            inactiveIcon:
                'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/notChecked1126.png',
            activeIcon:
                'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/goodsChecked1126.png',
            disabledIcon: 'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/disabledIcon.png',
            bottomHeight: '',
            nowDate:new Date().getTime(),
            currentDate:'',
            showTips:false,  //页面底部多选 
            showTipsSingle:false,   //danxuan 入库
            popupItem:undefined,
            footerHeight:0

        }
    },
    mounted() {
        // 页面首先显示未入库数据
        this.reportManagerPageManagerInDate()

        // 假数据需要
        // this.recordList.forEach(ele => {
        //     this.$set(ele, 'isChecked', false)
        // })
        console.log(this.recordList, 'ppp')
        this.$nextTick(() => {
            let menuHeight=0
            if(this.$refs.bottomMenu && this.$refs.bottomMenu.offsetHeight){
                menuHeight = this.$refs.bottomMenu.offsetHeight
                console.log('底部菜单栏高度：', menuHeight)
            }
            const footerMenu=this.$refs.footer.footerMenu
            console.log('底部菜单栏高度111aaa：', footerMenu)
            this.footerHeight=footerMenu
            this.bottomHeight = `padding-bottom: ${Number(menuHeight) + Number(this.footerHeight)}px;`
            console.log(this.bottomHeight, 'bottomHeight')
        })

        const timestamp = new Date().getTime();
        const date = new Date(timestamp);
        const year = date.getFullYear();
        const month = String(date.getMonth() + 1).padStart(2, '0');
        const day = String(date.getDate()).padStart(2, '0');
        this.currentDate = `${year}-${month}-${day}`;
        console.log(this.currentDate,'this.currentDate');

    },

    created() {

    },
    methods: {
                
        // 切换页面顶部的tab
        changeSort(index,e,name){
            this.recordList=[]
            this.current = index
            // if(index===0){
            //     this.reportManagerPageManagerInDate()
            // }else if(index===1){
            //     this._InManagerPageManagerInDate()
            // }
            this.reportManagerPageManagerInDate()
        },

        // 申报明细
        tocheckedDetail(item, val) {
            item.isTag=!item.isTag
        },
        handleCheckAll(checkedAll){
            // if(checkedAll){
            //     this.$refs.checkboxGroup.toggleAll(true);
            // }else{
            //     this.$refs.checkboxGroup.toggleAll(false);
            // }
            this.checked = this.checkAll
                ? this.recordList.map(item => item.reportId)
                : []
            this.recordList.forEach(item => {
                item.isChecked = this.checkAll
            })
        },
        onCheckboxChange(newChecked){
            console.log(newChecked,'已选项')
            this.checked = newChecked;
            this.checkAll = newChecked.length === this.recordList.length;
            // 确保在全选状态下取消某一项时，其他项状态不变
            this.recordList.forEach(item => {
                item.isChecked = newChecked.includes(item.reportId)
            });
          
        },
        //入库
        ruku(item){
            this.popupItem=item  //单选
            console.log(item)
            this.showTipsSingle=true
        },

        // 批量入库
        batchInStore(){
            if(this.checked.length>0){
                this.showTips=true
            }else{
                Toast('请进行选择')
            }
        },
        //单选弹窗
        submitStockInSingle(){
            this.showTipsSingle=false
            console.log(this.popupItem,'单选弹窗')
            this._inStoreApi([this.popupItem])
            // this.changeSort()
            this.reportManagerPageManagerInDate()
            
        },
        // 多选弹窗确认
        submitStockIn(){
            //过滤出被选择的
            const itemArr = this.recordList.filter(item => {
                console.log(item.isChecked,item);
                return item.isChecked
            })
            this._inStoreApi(itemArr)
            this.showTips=false
            this.reportManagerPageManagerInDate()
        },
        
        showInputNum(){
            // todo 没有input
        },
        jian(ele){
            console.log(ele)
            if(ele.num>1){
                ele.num--
            }else{
                Toast('该宝贝数量不能再减少了呦！')
            }
        },
        add(ele){
            console.log(ele)
            ele.num++
        },
        // 未入库 report
        reportManagerPageManagerInDate(){
            this.loading=true
            const params = {
                // pageNum:1,
                // pageSize:1000,
                status:this.current===0 ? 'report':'in'
            }
            managerPageManagerInDate(params).then(res =>{
                console.log(res);
                if(res.code==200){
                    this.recordList = res.data.records
                    this.recordList.forEach(ele => {
                        this.$set(ele, 'isChecked', false)
                        this.$set(ele,'isTag',false)
                    })
                    this.loading = false
                }
               
            })
        },
        // //已入库 in
        // _InManagerPageManagerInDate(){
        //     this.loading=true
        //     const params = {
        //         // pageNum:1,
        //         // pageSize:1000,
        //         status:'in'
        //     }
        //     managerPageManagerInDate(params).then(res =>{
        //         console.log(res);
        //         if(res.code==200){
        //             this.recordList = res.data.records
        //             this.recordList.forEach(ele => {
        //                 // this.$set(ele, 'isChecked', false)
        //                 this.$set(ele,'isTag',false)
        //             })
        //             this.loading = false
        //         }
               
        //     })
        // },
        //组装数据
        _inStoreApi(itemArr){
            const data = itemArr.map(item =>{
                const children = item.reportChildList.map(child =>{
                    return {
                        reportChildId:child.id,
                        inNum:child.num
                    }
                })
                return{
                    reportId:item.reportId,
                    reportItemList:children
                }
            })
            inStoreApi(data).then(res =>{
                console.log(res);
                if(res.code===200){
                    this.reportManagerPageManagerInDate()
                    this.checked=[]
                    this.selectedRowKeys=[]
                    
                    Toast('入库成功！')
                }else{
                    // 非昨日数据  不能入库
                    Toast(res.message)
                }
            })
        },

    },
    beforeDestroy() {
        console.log('index')
        window.removeEventListener('scroll', this.onLoad, true)
    }
}
</script>

<style lang="less" scoped>
span,
p {
    padding: 0;
    margin: 0;
}

.content {
    overflow: hidden;
    margin-bottom: 10px;
    background: #ffffff;
    height: 100%;
}
// 页面顶部的 未出库  已出库
.topBox {
    // margin-top: 44px; //headNav使用时  不注释
    padding-left: 24px;
    padding-right: 24px;
    width: calc(100% - 48px);
    background-color: #ffffff;
    height: 48px;
    position: fixed;
    z-index: 20;
    border-bottom: 1px solid #f9f9f9;

    // 全部分类  menu
    .sort-menu {
        width: 100%;
        height: 48px;
        line-height: 48px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        text-align: center;
        vertical-align: middle;

        .sort_option {
            font-size: 18px;
            line-height:18px ;
            // height: 26px;
            // line-height: 26px;
            cursor: pointer;
            // display: inline-block;
            // flex-direction: column;
            // align-items: center;
            color: #999999;
        }

        .sort_option_selected {
            font-weight: bolder;
            line-height: 18px;
            font-size: 18px;
            color: #0081D3;
            // padding: 0px 35px 0px;
        }
    }
}

// 数据列表
.recordList {
    margin-top: 48px;
    background: #ffffff;
    // padding-bottom: 5px;
    // margin-top: 60px; //headNav使用时  不注释
    border-top: 2px solid #f9f9f9;
}
.recordList_pb{
    padding-bottom: 150px;
}

// 未入库

.recordItem {
    background-color: #f9f9f9;
    padding-bottom: 5px;
    margin-bottom: 5px;
    
    .recordItem_bg{
        background: #ffffff;
    }
    .recordItem_top {
        display: flex;
        align-items: center;
        width: calc(100% - 48px);
        justify-content: space-between;
        padding-left: 24px;
        padding-right: 24px;
    }

    .recordItem_top_box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 24px;
        padding-bottom: 24px;
        width: 100%;
    }

    .recordItemL {
        display: flex;
        align-items: center;
    }

    .recordItemL-left {
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;

        img {
            width: 22px;
            height: 22px;
        }

    }

    .recordItemL-right {
        display: flex;
        justify-content: center;
        flex-direction: column;
        margin-left: 12px;

        .recordItemL-right-text {
            font-size: 14px;
            color: #000000;
            text-align: left;
        }
    }

    .recordItemR {
        display: flex;
        align-items: center;

        .recordItemR-left {
            .recordItemR-left-num {
                color: #666666;
                font-size: 14px;
            }

            .recordItemR-left-price {
                color: #000000;
                font-size: 14px;
            }
        }


        .recordItemR-right {
            padding-left: 12px;
        }
    }
}

.recordItem:last-child {
    margin-bottom: 0px;
}

.goods-box {
    background-color: #ffffff;
    padding: 12px 48px 12px 72px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f9f9f9;
    justify-content: space-between;

    .goods-title {
        font-size: 12px;
        // line-height: 12px;  //有些数据会换行
        text-align: left;
        color: #000000;
        width: 76%;
    }

    .goods-num {
        width: 20%;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .selectnum {
            font-size: 12px;
            text-align: center;
            color: #000000;
            margin: 0px 3px;
        }
    }
    // .plus {
    //   width: 15px;
    //   height: 15px;
    //   background: #047DCB;
    //   // border: none;
    //   border: 1px solid #047DCB;
    // }

    // /deep/ .plus .van-button--normal {
    //   color: #ffffff !important;
    //   padding: 10px;
    //   width: 15px;
    //   height: 15px;
    // }

    // .minus {
    //   width: 13px;
    //   height: 13px;
    //   border: 1px solid #047DCB;
    //   background: transparent;
    //   color: #047DCB;
    // }

    // /deep/.minus .van-button--normal {
    //   color: #047DCB !important;
    //   padding: 10px !important;
    //   width: 13px;
    //   height: 13px;
    // }

    // /deep/.van-button--info {
    //   padding: 10px !important;
    // }

    // /deep/.van-button--primary {
    //   padding: 10px !important;
    // }

    /deep/.van-button--normal {
        padding:0px !important;
    }
    .plus {
        width: 15px;
        height: 15px;
        background: #047DCB;
        border: none;
    }

    /deep/ .plus .van-button--normal {
        color: #ffffff !important;
        padding: 10px;
        width: 15px;
        height: 15px;
    }

    .minus {
        width: 15px;
        height: 15px;
        border: 1px solid #047DCB;
        background: transparent;
        color: #047DCB;
    }

    /deep/.minus .van-button--normal{
        color: #047DCB !important;
        padding: 10px !important;
        width: 13px;
        height: 13px;
    }
}

.btnArea {
    padding: 24px;
    text-align: center;
}


// 已入库
.recordItem_stockIn {
    background-color: #ffffff;
    padding-bottom: 5px;
    margin-bottom: 5px;

    .recordItem_bg_stockIn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 24px;
    }

    .stockIn_recordItemL {
        display: flex;
        align-items: center;

        .stockIn_recordItemL-left {
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;

            img {
                width: 22px;
                height: 22px;
            }

        }

        .stockIn_recordItemL-right {
            display: flex;
            justify-content: center;
            flex-direction: column;
            margin-left: 12px;

            .stockIn_recordItemL-right-text {
                font-size: 14px;
                color: #000000;
                text-align: left;
            }
        }
    }

    .stockIn_recordItemR {
        display: flex;
        align-items: center;

        .stockIn_recordItemR-left {
            .stockIn_recordItemR-left-num {
                color: #666666;
                font-size: 14px;
            }

            .stockIn_recordItemR-left-price {
                color: #000000;
                font-size: 14px;
            }
        }


        .stockIn_recordItemR-right {
            margin-left: 12px;
        }
    }
    .stockIn_details_box {
        margin: 0px 24px;
    }
    .stockIn_details_box  .goods-box {
        // background-color: #ffffff;
        padding: 12px 0px;
        margin-bottom: 5px;
        // display: flex;
        // align-items: center;
        // border-bottom: 1px solid #e5e5e5;
        // justify-content: space-between

        .stockIn_goods-num {
            display: flex;
            align-items: center;

            .selectnum {
                font-size: 12px;
                text-align: center;
                color: #000000;
                margin: 0px 3px;
            }
        }
    }
}

.recordItem_stockIn:last-child {
    margin-bottom: 0px;
}
.recordBottom {
    padding: 12px 24px;
    padding-bottom: 44px;

    .recordBottom_item {
        display: flex;
        align-items: center;
        justify-content: space-between;

        .recordBottom_item_label {
            font-size: 12px;
            line-height: 12px;
            text-align: left;
            color: #999999;
        }

        .recordBottom_item_text {
            font-size: 12px;
            line-height: 12px;
            text-align: left;
            color: #000000;
        }

        .recordBottom_item_name {
            display: flex;
            align-items: center;

            img {
                width: 54px;
                height: 30px;
            }
        }

    }
}
/*清浮动*/
.clearfix:after {
    content: '';
    display: block;
    clear: both;
}

.clearfix {
    zoom: 1;
}


// 无数据
.empty_content{
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: #000000;
    font-size: 16px;
    background: #ffffff;
}

// 多选按钮
.bottomArea {
    display: flex;
    align-items: center;
    padding: 24px;
    position: fixed;
    bottom: 50px;
    width: calc(100% - 48px);
    background-color: #ffffff;
}

.btnStockIn {
    border: 1px solid #047DCB;
    border-radius: 40px;
    color: #047DCB;
    width: 100%;
    height: 45px;
}

.btnArea {
    //margin: 0px 24px;
}

// 去逛逛
.loginBtn {
    width: 100%;
    height: 45px;
    border: none;
    background: #047DCB;
    border-radius: 45px;
    margin-left: 30px;
}

.tips {
    margin-top: 25px;
    font-size: 14px;
    text-align: right;
    color: #000000;
    line-height: 14px;
}

/deep/ .van-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    width: 48px;
}

/deep/.van-checkbox__label {
    font-size: 12px;
    color: #010101;
}

// 弹窗
.top_title {
  width: 100%;
  height: 30px;
  line-height: 30px;
  color: #000;
  font-size: 15px;
  text-align: center;
  margin-top: 60px;
  margin-bottom: 30px;
}

.sub_btn {
  width: 80%;
  height: 44px;
  line-height: 44px;
  text-align: center;
  border-radius: 22px;
  color: #fff;
  background: #047DCB;
  margin: 8px auto;
  font-size: 15px;
}

.mt10{
    margin-top: 10px;
}

</style>